[knx] Prevent reconfiguration of Things during device discovery#19839
[knx] Prevent reconfiguration of Things during device discovery#19839kaikreuzer merged 1 commit intoopenhab:mainfrom
Conversation
Prevents reconfiguration of connection type during discovery runs. Previously, existing Things were rediscovered and reconfigured to default connection type. This comes with the drawback that all discovered devices need to be manually configured (i.e. set a proper connection type). Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
| .withLabel(response.getDevice().getName() + " (router mode)") | ||
| .withProperty("serialNumber", serial + "-r").withProperty("type", "ROUTER") | ||
| .withProperty("ipAddress", "224.0.23.12") | ||
| .withProperty("serialNumber", serial + "-r").withProperty("ipAddress", "224.0.23.12") |
There was a problem hiding this comment.
I know, it is unrelated to this PR, but as I stumble over it here: Why is the IP address of the router set to its multicast address? Surely, the router listens via multicast, but it also has a physical IP address, which I would rather expect here. I would rather either set the physical address (i.e. similar as for tunnel) or omit the ip address completely as it is of no specific value (as the multicast address is static and identical for all KNX routers).
There was a problem hiding this comment.
https://www.openhab.org/addons/bindings/knx/#ip-gateway
If I get the docs correctly, it says that you could put the multicast address.
I don't have routers (not even older ones without security) at hand, so this part is a bit weak.....
There was a problem hiding this comment.
"the IPv4 Multicast Address can be set" ... but is useless.
Well, nothing to change for 5.1, but maybe this should simply be removed for 5.2...
kaikreuzer
left a comment
There was a problem hiding this comment.
Let's choose the low-risk approach to be on the safe side!
|
@kaikreuzer :-( |
|
That's actually a report not about the type but about the IP address changing - and it concerns the issue I had mentioned: The multicast address simply does not belong in that field, the automatic update actually does the correct thing... |
|
Not exactly, it seems the router announces both tunnel and routing mode. I am preparing something to improve it for routers. Give me a bit time to submit the PR. |
Follow-up to openhab#19839. Discover separate Things for KNX IP routers and avoid setting IP address and port for routers. Routers use a defined multicast address. Make sure that Thing for router is separate, event if the same device exports a tunneling device. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Follow-up to #19839. Discover separate Things for KNX IP routers and avoid setting IP address and port for routers. Routers use a defined multicast address. Make sure that Thing for router is separate, event if the same device exports a tunneling device. Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
Prevents reconfiguration of connection type during discovery runs. Previously, existing Things were rediscovered and reconfigured to default connection type.
This comes with the drawback that all discovered devices need to be manually configured (i.e. set a proper connection type). Initially, they will be in state
HANDLER_CONFIGURATION_PENDING {type=...}If you copy the code snippet from Inbox, the mandatory parameter
type=...is missing.Alternative to #19828, fixes #19824